#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: mkdata.py
# $Date: Tue Jun 19 16:47:30 2012 +0800
# $Author: jiakai <jia.kai66@gmail.com>

import sys

s = chr(1) * 2048
for i in range(2, 256):
    s += chr(i)

if len(sys.argv) == 2:
    print hex(s.find(chr(int(sys.argv[1], 16))))
else:
    print s


